Is there a Lifo type priority queue in python in case of multiple elements with the same priority